. "$builders_dir_root/openssl/tmp.kludge0.sh"

pkg_name=openssl
version=1.0.2a
src_dir=$src_dir_root/$pkg_name-$version
url=https://www.openssl.org/source/$pkg_name-$version.tar.gz

cd "$src_dir_root"
rm -Rf "$pkg_name-$version"
tar zxf "$pkg_name-$version.tar.gz"

cd "$src_dir"

OLD_PATH=$PATH
export PATH=/libexec/openssl-perl/bin:$PATH
"$src_dir/Configure"					\
	--prefix=/libexec/transmission-openssl		\
	threads						\
	zlib-dynamic					\
	shared						\
	linux-x86_64
make

install_tmp_dir=/tmp/$pkg_name-$version
rm -Rf "$install_tmp_dir"
mkdir -p "$install_tmp_dir"
make install "INSTALL_PREFIX=$install_tmp_dir"
export PATH=$OLD_PATH

install_dirs "$builders_dir_root/transmission-$pkg_name/runtime.dirs"
install_files "$builders_dir_root/transmission-$pkg_name/runtime.files" "$install_tmp_dir"
install_links "$builders_dir_root/transmission-$pkg_name/runtime.links"
install_dirs "$builders_dir_root/transmission-$pkg_name/devel.dirs"
install_files "$builders_dir_root/transmission-$pkg_name/devel.files" "$install_tmp_dir"
elf_strip "$builders_dir_root/transmission-$pkg_name/elf-strip"

rm -Rf "$install_tmp_dir"
rm -Rf "$src_dir"

remove_files "$builders_dir_root/openssl/tmp.kludge0.files"
remove_files "$builders_dir_root/openssl/tmp.kludge0.links"
remove_dirs "$builders_dir_root/openssl/tmp.kludge0.dirs"
